const express = require('express')
const router = express.Router()
// 导入自定义中间件
const checkJwt = require('../middleware/checkJwt')
// 导入控制器
const membersController = require('../controller/members')
// 路由规则
// 个人信息获取
router.get('/members', checkJwt, membersController.getMembers)
router.get('/member', checkJwt, membersController.getMember)
router.post('/members', checkJwt, membersController.addMember)
router.delete('/members/:phone', checkJwt, membersController.deleteMember)
router.put('/members', checkJwt, membersController.updateMember)
module.exports = router